<template>
<div id="bind-attribute">
  <div v-bind:title="messageA">
    v-bind全写
  </div>
  <div :title='messageB'>
    v-bind简写
  </div>
</div>
</template>

<script lang="ts">
import { defineComponent, toRefs, reactive } from 'vue'

export default defineComponent({
  name: 'AttributeBinding',
  setup() {
    const message = reactive({
      messageA: "我是v-bind全写时的title",
      messageB: "我是v-bind简写时的title"
    })
    return {
      ...toRefs(message),
    }
  }
})
</script>